package com.kkw.shoppingmall.auth.feign;

import com.kkw.common.utils.R;
import com.kkw.shoppingmall.auth.feign.fallback.MemberFallbackService;
import com.kkw.shoppingmall.auth.vo.SocialUser;
import com.kkw.shoppingmall.auth.vo.UserLoginVo;
import com.kkw.shoppingmall.auth.vo.UserRegisterVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author Kevin
 * @date 2021-06-09
 **/
@FeignClient(value = "shoppingmall-member",fallback = MemberFallbackService.class)
//@RequestMapping("/api")
public interface MemberFeignService {


    @PostMapping("/member/member/register")
    R register(@RequestBody UserRegisterVo registerVo);


    @PostMapping("/member/member/login")
    R login(@RequestBody UserLoginVo loginVo);

    @PostMapping("/member/member/oauth2/login")
    R login(@RequestBody SocialUser socialUser);
}
